package com.zte.shopping.service;

import com.zte.shopping.entity.Order;
import com.zte.shopping.entity.User;
import com.zte.shopping.exception.UserNotLoginException;
import com.zte.shopping.vo.CartVo;

import java.util.List;

public interface OrderService {
    
    /**
     * @Author zuti
     * @Description //TODO 查询用户订单
     * @Date 20:22 2020/6/30
     * @Param [user]
     * @return java.util.List<com.zte.shopping.entity.Order>
     **/
    List<Order> findByUserId(User user) throws UserNotLoginException;

    /**
     * @Author zuti
     * @Description //TODO 创建订单
     * @Date 21:20 2020/6/30
     * @Param [user, cart]
     * @Parem user
     * @Parem cart
     * @return java.lang.String
     **/
    String createOrder(User user, CartVo cart);

    /**
     * @Author zuti
     * @Description //TODO 查询订单详情
     * @Date 21:31 2020/6/30
     * @param orderId 订单Id
     * @return com.zte.shopping.entity.Order
     **/

    Order findByOrderId(String orderId);
}
